using System;
using System.IO;
using System.Xml.Serialization;
using System.Collections.Generic;

namespace Jedi {

public class LIMOX<T> {
	public static void Serialize(string file, T entity) {
		using (StreamWriter stream = new StreamWriter(file)) {
			XmlSerializer saver = new XmlSerializer(typeof(T));
                	saver.Serialize(stream, entity);
		}
	}
	
	public static T Deserialize(string file) {
		T entity = default(T);
		using(StreamReader stream = new StreamReader(file)){
			XmlSerializer loader = new XmlSerializer(typeof(T));
                	entity = (T)loader.Deserialize(stream);
		}
		return entity;
	}
}

}